home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 10
/
Amoszine 10 (Disk 3 of 3).adf
/
Text_Files.lha
/
pp_lib_amos.txt3
< prev
next >
Wrap
Text File
|
1995-12-11
|
2KB
|
51 lines
AJ> I've been trying to figure out how to write the crunched file.
AJ> I'll show you what I've come up with after looking in some books -
AJ> I've never written files using doslibrary!
Its dead easy, probably the easiest lib of all to write for, you're
spot on with what you have already done with Open(), ppWriteWhatsit(),
Write(), Close() etc.
AJ> Step 2 is where I'm stuck.
AJ> The info you gave me was
AJ> success = ppWriteDataHeader ( lock , efficiency , crypt , checksum );
AJ> ULONG BPTR ULONG BOOL ULONG
AJ> D0 D0 D1 D2 D3:16
AJ> The problem is I've no idea what to load the registers with.
AJ> Guess-time:
AJ> Do I by any chance load D0 with the filehandle?
Yes, the filehandle acts as a 'lock' on the file so no other process
can access it while you are using it.
AJ> Presumably efficiency is the same as it is in the other routines?
Indeed it is.
AJ> Do I load D2 with 0 since no encryption has been used?
Yep.? (Y,n,c):
AJ> Also,
AJ> What do BPTR and :16 mean?
A BPTR is a hold-over from the days when DOS was written in BCPL.
Unless you are programming in assembler you don't have to worry about
it, it's just a 'pointer' that you use as a handle to certain DOS
objects.
The :16 means that only 16 bits of the register are used, even though
all 32 bits are passed to the routine, the upper 16 bits must be 0.
AJ> Sorry for asking you yet more questions!
It gives me summat to do! I've not been here much in the past month or
so, too busy with exams :o(
See ya,
__
|_)_ _ _|
| (_|(_)l